package edu.ustb.aur.chain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import edu.ustb.aur.handler.ListToVarcharTypeHandler;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.ibatis.type.JdbcType;

import java.util.List;

/**
 * @author ShiZhe
 * @create 2021-11-17 10:04
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "chain", autoResultMap = true)
public class Chain {

    /**
     * 合约唯一id
     */
    @TableId
    private String contractId;

    /**
     * 合约名
     */
    private String contractName;

    /**
     * 合约对应操作产生的交易的集合
     */
    @TableField(jdbcType = JdbcType.VARCHAR, typeHandler = ListToVarcharTypeHandler.class)
    private List<String> contractTxIdList;
}
